Method and apparatus for transforming and rendering graphical curves

ABSTRACT

The present invention provides a method and apparatus for rendering images on a computer screen. Under the invention, a portion of a base image is described using a path. The path is then transformed using a non-affine transform to produce a transformed path. The transformed path is then rendered onto the computer screen. Another aspect of the present invention is a method and apparatus for rendering curves of any order and any dimension. In particular, the present invention provides a means for converting a function of any order and any dimension that describes one segment of a curve into a function that describes a different sized segment or an adjoining segment.

REFERENCE TO RELATED APPLICATION

The present application is related to a co-pending application U.S. Ser. No. 09/452,422, filed on even-date herewith and owned by a common assignee. The related application is entitled “WARPING TEXT ALONG A CURVED PATH”.

BACKGROUND OF THE INVENTION

The present invention is related to computer graphing systems. In particular, the present invention is related to transforming and rendering shapes on a computer output device.

Many of the images that appear on a computer screen or on a computer-printed page are generated by passing a base image through some form of transform. This technique allows a computer to display many different versions of the base image without storing all of the versions in long-term memory. For example, using a single base image of the letter “b”, a computer can generate large versions of the letter, can change the location or orientation of the letter on the display or page, or can skew the letter by slanting its top to the left or to the right.

In two-dimensional graphics, transforms have historically been limited to affine transforms where all parallel lines in the base image remain parallel in the transformed image. Affine transforms include scaling, rotating, skewing, and translating (i.e. changing location).

Two techniques have been developed for performing affine transforms. In one technique, each pixel of the base image is transformed separately by transforming the coordinates of the pixel. Thus, if there were one hundred pixels in an image, one hundred transforms would be performed. In the other technique, pixels within a base image are described using a set of equations known as a path. Typically, the x-coordinates of the pixels are described using one equation and the y-coordinates of the pixels are described using a separate equation. These paths are then transformed to produce a new set of equations that describe the pixels of the transformed image.

Recently, more complex non-affine transforms have been developed, which provide a three-dimensional appearance to two-dimensional objects. In a non-affine transform, lines that are parallel in the base image do not necessarily remain parallel in the transformed image. Because of the complexity of these transforms, only pixels have been transformed in the prior art. To transform more complex curves, the prior art transforms selected points along the curve and then connects the transformed points together to construct the transformed curve.

This technique for performing non-affine transforms is less than ideal because a large number of data points must be transformed for very complex curves. In addition, the exact description of the curve is lost in the transform. This can cause the curve to appear jagged in the transformed space, especially if further transforms are performed on the points approximating the curve.

SUMMARY OF THE INVENTION

The present invention provides a method and apparatus for rendering images on a computer screen. Under the invention, a portion of a base image is described using a path. The path is then transformed using a non-affine transform to produce a transformed path. The transformed path is then rendered onto the computer screen.

Another aspect of the present invention is a method for rendering curves of any order and any dimension. In particular, the present invention provides a means for converting a function of any order that describes one segment of a curve into a function that describes a different sized segment or an adjoining segment.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A and 1B show a non-affine transform of a square from u,v space to x,y space under the prior art.

FIGS. 2A and 2B show a non-affine transform of a line from u,v space to x,y space under the prior art.

FIG. 3A shows a curve in u,v space.

FIG. 3B shows a series of lines that approximates the curve of FIG. 3A in u,v space under the prior art.

FIG. 3C shows a non-affine transform of each of the lines of FIG. 3B into x,y space under the prior art.

FIGS. 4A and 4B show a transform of a unit square in u,v space into a quadrilateral in x,y space that defines a non-affine transform.

FIGS. 5A and 5B show a bilinear transform of a line under an embodiment of the present invention.

FIGS. 6A and 6B show a bilinear transform of a curve under an embodiment of the present invention.

FIGS. 7A, 7B, 7C, and 7D show a curve that is divided into segments under a rendering embodiment of the present invention.

FIGS. 8A, 8B, and 8C show a flow diagram for rendering curves under an embodiment of the invention.

FIG. 9 shows a block diagram of software and hardware components associated with an embodiment of the present invention.

FIG. 10 shows a block diagram of a suitable computing environment in which embodiments of the present invention may be practiced.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

FIGS. 1A and 1B are graphs of two different two-dimensional spaces that define a base image space and a non-affine transform image space, respectively. FIG. 1A shows the base image space, which is described by two orthogonal coordinates u,v and that contains a square 200 defined by four corner points A_(u,v), B_(u,v), C_(u,v), and D_(u,v). FIG. 1B shows the non-affine transform space, which is described by two orthogonal coordinates x,y and that contains a quadrilateral 202 defined by four corner points A_(x,y), B_(x,y), C_(x,y), and D_(x,y). The differences between quadrilateral 202 and square 200 define the transform. In other words, passing the points of square 200 through the transform results in quadrilateral 202. Since the transform may be described by the four corner points of the quadrilateral, this type of non-affine transform is sometimes referred to generically as a “quad” transform.

FIGS. 2A and 2B show graphs of a line 204 in the base image space that is transformed into a line 206 in the non-affine transform space using a technique of the prior art. Under the prior art, two end points 208 and 210 of the base image are transformed to form two end points 212 and 214 in the transformed space. These end points are the connected together to form transformed line 206. Although this technique provides an accurate transform of line 204 for some non-affine transforms, for most non-affine transforms, line 206 is different from the curve that would be generated if every point along line 204 were transformed independently.

FIGS. 3A, 3B and 3C show graphs depicting the prior art technique for transforming more complex curves using a non-affine transform. FIG. 3A shows a curve 220 of the base image. Under the prior art, curve 220 was transformed by representing the curve as a series of straight lines 222, 224, 226, and 228, in the base image space as shown in FIG. 3B. The endpoints of these lines were then transformed to form a set of transformed endpoints. Thus, endpoints 230, 232, 234, 236, and 238 of FIG. 3B were transformed into transformed endpoints 240, 242, 244, 246 and 248 of FIG. 3C. These endpoints were then connected together to form the transformed curve 250.

Under the prior art, transformed curve 250 is an inaccurate approximation of the curve that would be produced if every point along curve 220 were transformed individually. In addition, because the curve is converted into a set of selected points, the description of the curve is lost during the transform process. Because of this, transformed curve 250 can appear jagged under the prior art.

The present invention overcomes the problems of the prior art by providing a means for transforming a set of equations that describe curves and lines in a base image instead of the individual points of the base image. This produces a more accurate non-affine transform and retains the description of curves in the base image so that the curve appears smoother in the transform space.

Two non-affine transforms known as bilinear and perspective are of particular interest under the present invention. Although both are “quad” transforms, they each have different properties from each other. In a bilinear transform, a square box is transformed into a quadrilateral such that any point along an edge of the square becomes a point on the edge of the quadrilateral and the point's relative position on the square edge is the same as its relative position on the quadrilateral edge. Thus, if a point's location along a square edge is one quarter the distance of the square edge, the transformed point's location will be one quarter the distance of the quadrilateral edge. In a perspective transform, the two-dimensional base image is transformed into a three-dimensional image. The three-dimensional image is then projected onto a two-dimensional surface to generate the transformed image.

Bilinear Transforms

Under one embodiment of the present invention, a bilinear transform is performed by transforming equations that describe the two coordinates of a curve. In most embodiments, the equations that describe the coordinates are functions of t, where t has values between zero and one. Thus, in a u, v coordinate system: u=f _(u)(t)  EQ. 1 v=f _(v)(t)  EQ. 2

Each coordinate x, y in the transform space is formed by combining Equations 1 and 2 using coordinate specific transform functions of the form: x=uvα _(x) +uβ _(x) +vγ _(x) +δ _(x)  EQ. 3 y=uvα _(y) +uβ _(y) +vγ _(y) +δ _(y)  EQ. 4 where the constants, α_(x), β_(x), γ_(x), δ_(x), α_(y), β_(y), γ_(y), and δ_(y), are determined from the corner points of a quadrilateral formed by transforming a base image square having corners at u,v coordinates of 0,0, 0,1, 1,0, and 1,1. FIG. 4A shows a graph of such a unit square 260 in u,v space and FIG. 4B shows a resulting transform quadrilateral 262, which is defined by corners P₀, P₁, P₂, and P₃. Based on FIGS. 4A and 4B, the constants of Equations 3 and 4 are defined as: α_(x) =p _(0,x) −p _(1,x) −p _(2,x) +p _(3,x)  EQ. 5 â _(x) =−p _(0,x) +p _(1,x)  EQ. 6 ã _(x) =−p _(0,x) +p _(2,x)  EQ. 7 ä _(x) =p _(0,x)  EQ. 8 á _(y) =p _(0,y) −p _(1,y) −p _(2,y) +p _(3,y)  EQ. 9 â _(y) =−p _(0,y) +p _(1,y)  EQ. 10 ã _(y) =−p _(0,y) +p _(2,y)  EQ. 11 ä _(y) =p _(0,y)  EQ. 12 where a subscript x designates the x coordinate of the point and a subscript y designates the y coordinate of the point.

Using equations 1 and 2 above, a line in the base image can be defined as: u=tm _(u) +n _(u)  EQ. 13 v=tm _(v) +n _(v)  EQ. 14 where (n_(u), n_(v)) is the starting point of the line and (m_(u)+n_(u), m_(v)+n_(v)) is the ending point of the line. An example of a line described by Equations 13 and 14 is shown as line 300 in FIG. 5A.

Combining equations 13 and 14 with equations 3 and 4 produces a set of transformed equations: x=(tm _(u) +n _(u))(tm _(v) +n _(v))á _(x)+(tm _(u) +n _(u))â _(x)+(tm _(v) +n _(v))ã _(x) +ä _(x)  EQ. 15 y=(tm _(u) +n _(u))(tm _(v) +n _(v))á _(y)+(tm _(u) +n _(u))â _(y)+(tm _(v) +n _(v))ã _(y) +ä _(y)  EQ. 16 which describe the x and y coordinates of a transformed curve. Equations 15 and 16 can be re-written as: x=c _(2,x) t ² +c _(1,x) t+c _(0,x)  EQ. 17 y=c _(2,y) t ² +c _(1,y) t+c _(0,y)  EQ. 18 where: c _(2,x) =m _(u) m _(v) á _(x)  EQ. 19 c _(1,x)=(m _(u) n _(v) +m _(v) n _(u))á _(x) +m _(u) â _(x) +m _(v) ã _(x)  EQ. 20 c _(0,x) =n _(u) n _(v) á _(x) +n _(u) â _(x) +n _(v) ã _(x) +ä _(x)  EQ. 21 c _(2,y) =m _(u) m _(v) á _(y)  EQ. 22 c _(1,y)=(m _(u) n _(v) +m _(v) n _(u))á _(y) +m _(u) â _(y) +m _(v) ã _(y)  EQ. 23 c _(0,y) =n _(u) n _(v) á _(y) +n _(u) â _(y) +n _(v) ã _(y) +ä _(y)  EQ. 24 Equations 17 and 18 show that a bilinear transform of a straight line results in a second order curve under the present invention. FIG. 5B shows a graph of a second order curve 302 produced by performing a bilinear transform of straight line 300 of FIG. 5A. This second order curve may be described using a Bezier notation in which the curve is described relative to a set of three control points q₀, q₁, and q₂. Using the Bezier notation, equations 17 and 18 become: x=q _(0,x)(1−t)² +q _(1,x)2t(1−t)+q _(2,x) t ²  EQ. 25 y=q _(0,y)(1−t)² +q _(1,y)2t(1−t)+q _(2,y) t ²  EQ. 26 where

q _(0,x) =c _(0,x)  EQ. 27 $\begin{matrix} {q_{1,x} = {c_{0,x} + \frac{c_{1,x}}{2}}} & {{EQ}.\quad 28} \end{matrix}$  q _(2,x) =c _(0,x) +c _(1,x) +c _(2,x)  EQ. 29

q _(0,y) =c _(0,y)  EQ. 30 $\begin{matrix} {q_{1,y} = {c_{0,y} + \frac{c_{1,y}}{2}}} & {{EQ}.\quad 31} \end{matrix}$  q _(2,y) =c _(0,y) +c _(1,y) +c _(2,y)  EQ. 32

Based on equations 3 and 4, it can be seen that a path of order n in the base image becomes a path of order 2n in the transformed image. Thus, under embodiments of the present invention, cubic curve 320 of FIG. 6A, which is described by: u=t ³ a _(3,u) +t ² a _(2,u) +ta _(1,u) +a _(0,u)  EQ. 33 v=t ³ a _(3,v) +t ² a _(2,v) +ta _(1,v) +a _(0,v)  EQ. 34 becomes sixth order curve 322 of FIG. 6B when it is transformed, where sixth order curve 322 is represented by the path: x=c _(6,x) t ⁶ +c _(5,x) t ⁵ +c _(4,x) t ⁴ +c _(3,x) t ³ +c _(2,x) t ² +c _(1,x) t+c _(0,x)  EQ. 35 y=c _(6,y) t ⁶ +c _(5,y) t ⁵ +c _(4,y) t ⁴ +c _(3,y) t ³ +c _(2,y) t ² +c _(1,y) t+c _(0,y)  EQ. 36 with c _(6,x) =a _(3u) a _(3v) á _(x)  EQ. 37 c _(5,x)=(a _(3u) a _(2v) +a _(2u) a _(3v))á _(x)  EQ. 38 c _(4,x)=(a _(3u) a _(1v) +a _(2u) a _(2v) +a _(1u) a _(3v))á _(x)  EQ. 39 c _(3,x)=(a _(3u) a _(0v) +a _(2u) a _(1v) +a _(1u) a _(2v) +a _(0u) a _(3v))á _(x) +a _(3u) â _(x) a _(3v) ã _(x)  EQ. 40 c _(2,x)=(a _(2u) a _(0v) +a _(1u) a _(1v) +a _(0u) a _(2v))á _(x) +a _(2u) â _(x) +a _(2v) ã _(x)  EQ. 41 c _(1,x)=(a _(1u) a _(0v) +a _(0u) a _(1v))á _(x) +a _(1u) â _(x) +a _(1v) ã _(x)  EQ. 42 c _(0,x) =a _(0u) a _(0v) á _(x) +a _(0u) â _(x) +a _(0v) ã _(x) +ä _(x)  EQ. 43 c _(6,y) =a _(3u) a _(3v) á _(y)  EQ. 44 c _(5,y)=(a _(3u) a _(2v) +a _(2u) a _(3v))á _(y)  EQ. 45 c _(4,y)=(a _(3u) a _(1v) +a _(2u) a _(2v) +a _(1u) a _(3v))á _(y)  EQ. 46 c _(3,y)=(a _(3u) a _(0v) +a _(2u) a _(1v) +a _(1u) a _(2v) +a _(0u) a _(3v))á _(y) +a _(3u) â _(y) a _(3v) ã _(y)  EQ. 47 c _(2,y)=(a _(2u) a _(0v) +a _(1u) a _(1v) +a _(0u) a _(2v))á _(y) +a _(2u) â _(y) +a _(2v) ã _(y)  EQ. 48 c _(1,y)=(a _(1u) a _(0v) +a _(0u) a _(1v))á _(y) +a _(1u) â _(y) +a _(1v) ã _(y)  EQ. 49 c _(0,y) =a _(0u) a _(0v) á _(y) +a _(0u) â _(y) +a _(0v) ã _(y) +δ _(y)  EQ. 50

Perspective Transform

Under other embodiments of the invention, a perspective transform is performed on a path defined in the u,v plane to produce a transformed path in the x,y plane. This involves first transforming the path into a three-dimensional x′, y′, w′ space then projecting the path in the three-dimensional space onto the x,y plane.

The transform into the three-dimensional space can be represented by a matrix expression: $\begin{matrix} \left( \begin{matrix} x^{\prime} & y^{\prime} & {\left. w^{\prime} \right) = {\begin{pmatrix} u & v & 1 \end{pmatrix}\begin{pmatrix} m_{u,x} & m_{u,y} & m_{u,w} \\ m_{v,x} & m_{v,y} & m_{v,w} \\ m_{1,x} & m_{1,y} & m_{1,w} \end{pmatrix}}} \end{matrix} \right. & {{EQ}.\quad 51} \end{matrix}$ where u and v are each functions of t. The projection onto the xy plane is then formed by dividing the equations for the x′ and y′ coordinates by the equation for the w′ coordinate: $\begin{matrix} {x = \frac{x^{\prime}}{w^{\prime}}} & {{EQ}.\quad 52} \\ {y = {\frac{y^{\prime}}{w^{\prime}}.}} & {{EQ}.\quad 53} \end{matrix}$

From equations 51, 52, and 53 it can be seen that if u and v are described by linear equations, then x and y will also be described by the ratio of linear equations. In fact, if u and v are functions of order n, then x and y are rational functions of order n.

Rendering Bezier Curves

Once the paths have been transformed, either through a bilinear or perspective transform, the transformed equations for x and y must be rendered into individual pixels on a display. When x and y are linear equations, it is relatively easy to convert the equations into individual pixels. However, for more complex x and y equations, the determination of individual pixels is computationally intensive.

Under the prior art, higher order curves are rendered by approximating the higher order curve as a series of lines. Although techniques for identifying these lines have been discussed in the prior art, specific examples have only been given for third order functions. From the examples, those skilled in the art can generate the lines for higher order curves. However, this involves generating a new set of rendering equations for each order curve, a task that is typically done by hand. The prior art does not provide an efficient means for generating the equations needed to render curves of any order. The present invention addresses this problem by providing a method for generating the equations needed to render any order curve.

Any order curve can be described using a Bezier notation. Under that notation, a curve r of order n is described by: $\begin{matrix} {r = {\sum\limits_{i = 0}^{n}\quad{{B_{i}^{n}(t)}q_{i}}}} & {{EQ}.\quad 54} \end{matrix}$ where q_(i) are the Bézier control points for curve r, and B_(i) ^(n) are Bernstein polynomials of n-th order that are defined as: $\begin{matrix} \left\{ {\begin{matrix} {{B_{i}^{n}(t)} = {\begin{pmatrix} n \\ i \end{pmatrix}{t^{i}\left( {1 - t} \right)}^{n - i}}} & {{{for}\quad 0} \leq i \leq n} \\ {{B_{i}^{n}(t)} = 0} & {{{for}\quad i} < {0\quad{or}\quad i} > n} \end{matrix}\quad{where}} \right. & {{EQ}.\quad 55} \\ {\begin{pmatrix} n \\ i \end{pmatrix} = {\frac{n!}{{i!}{\left( {n - i} \right)!}}.}} & {{EQ}.\quad 56} \end{matrix}$

Under this description of the curve, the locations of the control points, q_(i), define the shape of the curve. In particular, q₀ and q_(n) define the start and end of the curve. Note that the control points have the same dimensions as the curve they represent. Thus, for the two-dimensional curves produced by a bilinear transform, the control points have two dimensions and for the three-dimensional curves produced by a perspective transform, the control points have three dimensions. Our rendering technique can be applied to Bézier curves of any order and any dimensions.

The general technique of the prior art for determining the series of lines to approximate a curve, r, is described below with reference to a curve 400 shown in FIGS. 7A through 7D, and a flow diagram shown in FIGS. 8A through 8C.

The process of FIG. BA begins at start 500 and continues at step 502 where a variable, NSTEPS, is set to one. “NSTEPS” represents the number of lines that will need to be drawn given the current segment size. Initially, the current segment size is set to the entire length of the curve.

At step 504, the curve over the current segment is examined to determine if it may be approximated by a straight line. To decide this, a straight line is drawn between control points q₀ and q_(n), and a distance is calculated between the straight line and the other control points that define the curve. For example, in FIG. 7A a line 406 is drawn between control points 402 and 404. In most embodiments where the curve is defined in three dimensions, the three-dimensional control points are converted into two-dimensional control points using equations 52 and 53 above before the base line is drawn between the end control points. Thus, the distances are calculated using two-dimensional control points instead of three-dimensional control points. For a higher dimensional curve, the control points projected to a two-dimensional plane are used to calculate the distances. One rational for adopting this approach is that the curve is displayed in two-dimensions so that distances in the third dimension are irrelevant to approximating the curve with a straight two-dimensional line.

In one embodiment, the distance between a control point and the base line is measured along a line that is perpendicular to the base line and that intersects the control point. In some embodiments, the distance is determined by calculating a distance based on the x coordinate and a distance based on the y coordinate. The distance based on x coordinate is the distance between the point's x coordinate, q_(x,i), and a line drawn between the endpoints of the curve, r_(x), describing the x coordinate. The y coordinate distance is the distance between the y coordinate of the point, q_(y,i), and a line drawn between the endpoints of the curve, r_(y), describing the y coordinates. The distance with the larger magnitude can be used as the distance between the control point and the line or the square root of the sum of the squares of these two distances can be used as the distance between the control point and the line. In general, the selected distance is known as an error vector, with each control point having a separate error vector.

At step 506 of FIG. 8A, the error vectors are compared against a threshold to determine if any of the vectors exceeds the threshold. If one of the vectors exceeds the threshold, the line is not considered to be a sufficient approximation for the curve and the process continues at step 508.

In step 508, the equations describing the curve are altered so that they are functions of t/2 instead of functions of t. This produces equations that describe the first half of the curve. For example, in FIG. 7B, the new equations describe curve segment 408 such that q₀ of the new equations still corresponds to point 402 of curve 400 but q_(n) now corresponds to point 416, midway along curve 400. A technique for generating these “half-step” equations for any order curve is described below.

With the new segment size, the number of lines that needs to be generated doubles. Thus, in step 510, NSTEPS is doubled. The process then returns to step 504 to determine the error vectors for the new curve segment.

If none of the error vectors of a current curve segment exceed the threshold at step 506, the process continues at step 513 of FIG. 8B. In step 513, the last operation performed to produce the function describing the current curve segment is checked to see if it was a half-step operation. If it was, this is the largest segment that can be represented by a straight line and the process continues at state 516 where the line segment between the end points of the curve is stored in memory for later rendering. For example, if the last operation was a half-step operation to form the functions that describe curve segment 418 of FIG. 7C, line 420 would be stored.

If the last operation performed was not a half-step operation at step 513, then it is possible that a segment twice the size of the current segment could be represented by a straight line.

Before doubling the segment size, the present invention checks NSTEPS to see if it is an even number at step 526. If NSTEPS is odd at step 526, such as for curve segment 424 of FIG. 7C, the segment should not be doubled in size to see if a larger segment can be represented by a straight line. As such, the process continues at step 516 where the straight line for the current segment is stored in memory for later rendering. For example, line 426 of FIG. 7C would be stored for segment 424.

If NSTEPS is even at step 526, the equations describing the curve are changed so that they are functions of 2t instead of t at step 528. This is shown in FIG. 7D where the equations that describe curve segment 428, between points 416 and 432, are changed to describe a curve segment twice as large between points 416 and 404. A method of generating an equation based on 2t from an equation based on t for any order curve is described in more detail below.

With the doubling of the segment size, the number of lines that must be drawn is cut in half. Thus, at step 530, NSTEPS is divided by two. The process then returns to step 504 of FIG. 8A to determine if the larger segment may be approximated by a straight line such as line 438 of FIG. 7D.

After a line is stored for a curve segment at step 516 of FIG. 8C, NSTEPS is decremented by one at step 520. NSTEPS is then checked to see if it is greater than zero. If NSTEPS is equal to zero, the end of the curve has been reached and the process ends at step 524. If NSTEPS is greater than zero, the process continues at step 525, where the equations describing the last curve segment are changed to describe the next curve segment. This is achieved by changing the equations so that they are based on t+1 instead of t. A technique for changing the equations in this manner for any order curve is discussed further below. In general, step 525 can be referred to as a move operation. An example of a move operation is shown in FIG. 7C where the equations are changed from describing segment 418 to describing segment 424.

After moving to the next segment, the process returns to step 504 of FIG. 8A to determine if the new segment can be represented by a straight line.

As mentioned above, one aspect of the present invention is a method for generating the half-step, double-step and move functions for any order function that defines a curve segment. This method simplifies the creation of these functions for larger order curves, such as the sixth order curve generated above by passing a cubic curve through a bilinear transform.

Under one embodiment of the present invention, a single method is used to generate both the half-step and double step functions. In the prior art, generating the functions involves taking a current Bézier function that is in terms of t, substituting t/c for t, and reorganizing the function so that it is once again in terms of just t. This reorganization changes the control points of the Bézier function, but the order of the function remains the same. Under the method of the present invention, the reorganization of the function is simplified to a simple matrix calculation for converting the previous control points into a set of new control points.

Under one embodiment, the conversion matrix used in these calculations is formed by first re-writing the Bezier function for the curve in terms of a new variable {tilde over (t)} and a new set of control points {tilde over (q)}_(i). Since both functions describe the same curve, they can be set equal to each other as: $\begin{matrix} {{\sum\limits_{i = 0}^{n}\quad{{B_{i}^{n}(t)}q_{i}}} = {\sum\limits_{j = 0}^{n}\quad{{B_{j}^{n}\left( \overset{\sim}{t} \right)}{{\overset{\sim}{q}}_{j}.}}}} & {{EQ}.\quad 57} \end{matrix}$

Setting t=c{tilde over (t)} and using the identity: $\begin{matrix} {{B_{i}^{n}\left( {c\overset{\sim}{t}} \right)} = {\sum\limits_{j = 0}^{n}\quad{{B_{i}^{j}(c)}{B_{j}^{n}\left( \overset{\sim}{t} \right)}}}} & {{EQ}.\quad 58} \end{matrix}$ equation 57 provides the relationship between the control points of the two different equations as: $\begin{matrix} {{\overset{\sim}{q}}_{j} = {\sum\limits_{i = 0}^{j}\quad{B_{i}^{j}\quad(c)\quad{q_{i}.}}}} & {{EQ}.\quad 59} \end{matrix}$

If the coordinates of each control point are written in matrix form such that: $\begin{matrix} {{Q_{x} = \begin{pmatrix} q_{0,x} \\ q_{1,x} \\ \vdots \\ q_{n,x} \end{pmatrix}},{Q_{y} = \begin{pmatrix} q_{0,y} \\ q_{1,y} \\ \vdots \\ q_{n,y} \end{pmatrix}},{{\overset{\sim}{Q}}_{x} = \begin{pmatrix} {\overset{\sim}{q}}_{0,x} \\ {\overset{\sim}{q}}_{1,x} \\ \vdots \\ {\overset{\sim}{q}}_{n,x} \end{pmatrix}},{{{and}\quad{\overset{\sim}{Q}}_{y}} = \begin{pmatrix} {\overset{\sim}{q}}_{0,y} \\ {\overset{\sim}{q}}_{1,y} \\ \vdots \\ {\overset{\sim}{q}}_{n,y} \end{pmatrix}}} & {{EQ}.\quad 60} \end{matrix}$ then the relationship of equation 59 can be written as: {tilde over (Q)} _(x) =D(c)Q _(x) and {tilde over (Q)} _(y) =D(c)Q _(y)  EQ. 61 where D(c) is a matrix with ij components that are given by: (D(c))_(ij) =B _(j) ^(i)(c)  EQ. 62. For a half-step conversion, in which a function that describes a curve segment is converted into a function that describes half of the curve segment, c is equal to ½. Using Equation 62, matrix D(c) can be easily generated for any order curve, thus providing a simple means for determining the conversion equations for any order curve. For example, a sixth order curve has a half-step matrix D(½) of: $\begin{matrix} {{D\quad\left( {1/2} \right)} = {\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ {1/2} & {1/2} & 0 & 0 & 0 & 0 & 0 \\ {1/4} & {1/2} & {1/4} & 0 & 0 & 0 & 0 \\ {1/8} & {3/8} & {3/8} & {1/8} & 0 & 0 & 0 \\ {1/16} & {1/4} & {3/8} & {1/4} & {1/16} & 0 & 0 \\ {1/32} & {5/32} & {5/16} & {5/16} & {5/32} & {1/32} & 0 \\ {1/64} & {3/32} & {15/64} & {5/16} & {15/64} & {3/32} & {1/64} \end{bmatrix}.}} & {{EQ}.\quad 63} \end{matrix}$

Similarly, the double-step matrix D(2) can be easily calculated for any order curve using equation 62. For example, for a sixth order curve, D(2) is easily calculated as: $\begin{matrix} {{D\quad(2)} = {\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ {- 1} & 2 & 0 & 0 & 0 & 0 & 0 \\ 1 & {- 4} & 4 & 0 & 0 & 0 & 0 \\ {- 1} & 6 & {- 12} & 8 & 0 & 0 & 0 \\ 1 & {- 8} & 24 & {- 32} & 16 & 0 & 0 \\ {- 1} & 10 & {- 40} & 80 & {- 80} & 32 & 0 \\ 1 & {- 12} & 60 & {- 160} & 240 & {- 192} & 64 \end{bmatrix}.}} & {{EQ}.\quad 64} \end{matrix}$

If the curves are described as an n-th order polynomial instead of using the Bezier description, each curve, r, is represented as: $\begin{matrix} {r_{x} = {\sum\limits_{i = 0}^{n}\quad{a_{i,x}t^{i}}}} & {{EQ}.\quad 65} \\ {r_{y} = {\sum\limits_{i = 0}^{n}\quad{a_{i,y}t^{i}}}} & {{EQ}.\quad 66} \end{matrix}$ If the curves resented by equations 65 and 66 are described in terms of a new variable {tilde over (t)} and a new set of parameters ã_(i), the following equations are produced: $\begin{matrix} {{\sum\limits_{i = 0}^{n}\quad{a_{i,x}\quad t^{i}}} = {\sum\limits_{i = 0}^{n}\quad{{\overset{\sim}{a}}_{i,x}\quad{\overset{\sim}{t}}^{i}}}} & {{EQ}.\quad 67} \\ {{\sum\limits_{i = 0}^{n}\quad{a_{i,y}\quad t^{i}}} = {\sum\limits_{i = 0}^{n}\quad{{\overset{\sim}{a}}_{i,y}\quad{{\overset{\sim}{t}}^{i}.}}}} & {{EQ}.\quad 68} \end{matrix}$

Setting t equal to c{tilde over (t)}, in equations 67 and 68 produces the following relationships between the parameters: ã _(i,x) =c ^(i) a _(i,x)  EQ. 69 ã _(i,y) =c ^(i) a _(i,y)  EQ. 70 which can be written in matrix notation as: Ã _(x) =D _(p)(c)A _(x)  EQ. 71 Ã _(y) =D _(p)(c)A _(x)  EQ. 72 where $\begin{matrix} {{{\overset{\sim}{A}}_{x} = \begin{pmatrix} {\overset{\sim}{a}}_{0,x} \\ {\overset{\sim}{a}}_{1,x} \\ \vdots \\ {\overset{\sim}{a}}_{n,x} \end{pmatrix}},{{\overset{\sim}{A}}_{y} = \begin{pmatrix} {\overset{\sim}{a}}_{0,y} \\ {\overset{\sim}{a}}_{1,y} \\ \vdots \\ {\overset{\sim}{a}}_{n,y} \end{pmatrix}},{A_{x} = \begin{pmatrix} a_{0,x} \\ a_{1,x} \\ \vdots \\ a_{n,x} \end{pmatrix}},{{{and}\quad A_{y}} = \begin{pmatrix} a_{0,y} \\ a_{1,y} \\ \vdots \\ a_{n,y} \end{pmatrix}}} & {{EQ}.\quad 73} \end{matrix}$ and $\begin{matrix} {{D_{p}\quad(c)} = {\begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & c & 0 & 0 & 0 \\ 0 & 0 & c^{2} & 0 & 0 \\ 0 & 0 & 0 & ⋰ & 0 \\ 0 & 0 & 0 & 0 & c^{n} \end{bmatrix}.}} & {{EQ}.\quad 74} \end{matrix}$

When a curve is defined in higher dimensions than two, each component will follow the same relation as Equations 71 and 72.

Embodiments of the present invention also provide a means for generating the move functions that are the result of changing a current function from representing one curve segment to representing a neighboring curve segment of equal length. Using equation 57 above, with t={tilde over (t)}+1, the identity: $\begin{matrix} {{B_{j}^{n}\quad\left( {\overset{\sim}{t} + 1} \right)} = {\left( {- 1} \right)^{n - j}\quad{\sum\limits_{i = {n - j}}^{n}\quad{\begin{pmatrix} i \\ {n - j} \end{pmatrix}\quad 2^{i - {({n - j})}}\quad B_{i}^{n}\quad\left( \overset{\sim}{t} \right)}}}} & {{EQ}.\quad 75} \end{matrix}$ can be used to generate the following relationship between the control points of the two functions: $\begin{matrix} {{\overset{\sim}{q}}_{j} = {\sum\limits_{i = {n - j}}^{n}\quad{\left( {- 1} \right)^{n - i}\quad\begin{pmatrix} j \\ {n - i} \end{pmatrix}\quad 2^{j - {({n - i})}}\quad{q_{i}.}}}} & {{EQ}.\quad 76} \end{matrix}$

This can be described in a matrix form as: {tilde over (Q)}=S ^((n)) Q  EQ. 77 where $\begin{matrix} {{Q_{x} = \begin{pmatrix} q_{0,x} \\ q_{1,x} \\ \vdots \\ q_{n,x} \end{pmatrix}},{Q_{y} = \begin{pmatrix} q_{0,y} \\ q_{1,y} \\ \vdots \\ q_{n,y} \end{pmatrix}},{{\overset{\sim}{Q}}_{x} = \begin{pmatrix} {\overset{\sim}{q}}_{0,x} \\ {\overset{\sim}{q}}_{1,x} \\ \vdots \\ {\overset{\sim}{q}}_{n,x} \end{pmatrix}},{{{and}\quad{\overset{\sim}{Q}}_{y}} = \begin{pmatrix} {\overset{\sim}{q}}_{0,y} \\ {\overset{\sim}{q}}_{1,y} \\ \vdots \\ {\overset{\sim}{q}}_{n,y} \end{pmatrix}}} & {{EQ}.\quad 78} \end{matrix}$ and the ijth element of S^((n)), S_(ij) ^(n), is defined as: $\begin{matrix} {{S_{ij}^{n} \equiv \left( S^{(n)} \right)_{ij}} = {\left( {- 1} \right)^{n - j}\quad\begin{pmatrix} i \\ {n - j} \end{pmatrix}\quad{2^{i - {({n - j})}}.}}} & {{EQ}.\quad 79} \end{matrix}$

Thus, embodiments of the present invention provide a simple means for generating a matrix to convert a function from representing one curve segment to representing a neighboring curve segment.

If the function for the curve segment is in the form of a polynomial, equations 67 and 68 above can be used to generate the transform matrix by setting t={tilde over (t)}+1. This produces a transform matrix S_(p) that has ijth components defined as: $\begin{matrix} {S_{pij} = \begin{pmatrix} j \\ i \end{pmatrix}} & {{EQ}.\quad 80} \end{matrix}$ and which can be used to determine the parameters Ã_(x), Ã_(y) for the new curve segment from the parameters A_(x), A_(y) for the current segment using: Ã _(x) =S _(p) A _(x)  EQ. 81 Ã _(y) =S _(p) A _(y)  EQ. 82 where $\begin{matrix} {{{\overset{\sim}{A}}_{x} = \begin{pmatrix} {\overset{\sim}{a}}_{0,x} \\ {\overset{\sim}{a}}_{1,x} \\ \vdots \\ {\overset{\sim}{a}}_{n,x} \end{pmatrix}},{{\overset{\sim}{A}}_{y} = \begin{pmatrix} {\overset{\sim}{a}}_{0,y} \\ {\overset{\sim}{a}}_{1,y} \\ \vdots \\ {\overset{\sim}{a}}_{n,y} \end{pmatrix}},{A_{x} = \begin{pmatrix} a_{0,x} \\ a_{1,x} \\ \vdots \\ a_{n,x} \end{pmatrix}},{{{and}\quad A_{y}} = {\begin{pmatrix} a_{0,y} \\ a_{1,y} \\ \vdots \\ a_{n,y} \end{pmatrix}.}}} & {{EQ}.\quad 83} \end{matrix}$

Embodiments of the present invention also provide a method for converting a polynomial representation of a path into a Bézeir representation of the path. The method involves generating a conversion matrix that is determined by setting the Bézier representation of the path found in Equation 54 equal to the polynomial representation of the path found in Equations 65 and 66 above. This produces: $\begin{matrix} {r = {{\sum\limits_{i = 0}^{n}\quad{B_{i}^{n}\quad(t)\quad q_{i}}} = {\sum\limits_{j = 0}^{n}\quad{a_{j}\quad{t^{j}.}}}}} & {{EQ}.\quad 84} \end{matrix}$

Using the identity: $\begin{matrix} {t^{j} = {\frac{1}{\begin{pmatrix} n \\ j \end{pmatrix}}\quad{\sum\limits_{i = j}^{n}\quad{\begin{pmatrix} i \\ j \end{pmatrix}\quad B_{i}^{n}\quad(t)}}}} & {{EQ}.\quad 85} \end{matrix}$ equation 84 can be modified to produce: $\begin{matrix} {q_{i} = {\sum\limits_{j = 0}^{n}\quad{H_{ij}^{n}\quad a_{j}}}} & {{EQ}.\quad 86} \end{matrix}$ where $\begin{matrix} {H_{ij}^{n} = {\frac{\begin{pmatrix} i \\ j \end{pmatrix}}{\begin{pmatrix} n \\ j \end{pmatrix}}.}} & {{EQ}.\quad 87} \end{matrix}$

Using equation 87, an n-by-n matrix H can be created to convert the polynomial coefficients into a set of Bézier control points through the matrix equations: Q _(x) =HA _(x)  EQ. 88 Q _(y) =HA _(y)  EQ. 89 where $\begin{matrix} {{Q_{x} = \begin{pmatrix} q_{0,x} \\ q_{1,x} \\ \vdots \\ q_{n,x} \end{pmatrix}},{Q_{y} = \begin{pmatrix} q_{0,y} \\ q_{1,y} \\ \vdots \\ q_{n,y} \end{pmatrix}},} & {{EQ}.\quad 90} \\ {{A_{x} = \begin{pmatrix} a_{0,x} \\ a_{1,x} \\ \vdots \\ a_{n,x} \end{pmatrix}},{{{and}\quad A_{y}} = {\begin{pmatrix} a_{0,y} \\ a_{1,y} \\ \vdots \\ a_{n,y} \end{pmatrix}.}}} & \quad \end{matrix}$

An inverse relationship is also provided for converting Bézier control points into polynomial coefficients that describe the same path. That inverse relationship is: A _(x) =GQ _(x)  EQ. 91 A _(y) =GQ _(y)  EQ. 92 where $\begin{matrix} {{Q_{x} = \begin{pmatrix} q_{0,x} \\ q_{1,x} \\ \vdots \\ q_{n,x} \end{pmatrix}},{Q_{y} = \begin{pmatrix} q_{0,y} \\ q_{1,y} \\ \vdots \\ q_{n,y} \end{pmatrix}},{A_{x} = \begin{pmatrix} a_{0,x} \\ a_{1,x} \\ \vdots \\ a_{n,x} \end{pmatrix}},{{{and}\quad A_{y}} = \begin{pmatrix} a_{0,y} \\ a_{1,y} \\ \vdots \\ a_{n,y} \end{pmatrix}}} & {{EQ}.\quad 93} \end{matrix}$ and the ij elements of G are defined as: $\begin{matrix} {G_{ij}^{n} = {\left( {- 1} \right)^{i - j}\quad\begin{pmatrix} i \\ j \end{pmatrix}\quad{\begin{pmatrix} n \\ i \end{pmatrix}.}}} & {{EQ}.\quad 94} \end{matrix}$

Equations 62 and 79 above can also be represented as special cases for a more generalized description of selecting a new line segment. Specifically, we can describe t as extending from a point t₁ to a point t₂ using the following equation: t=t ₁(1−{tilde over (t)})+t ₂ {tilde over (t)}  EQ. 95 where t goes from t₁ to t₂ as {tilde over (t)} goes from 0 to 1. Using the following identity: $\begin{matrix} {{B_{j}^{n}\quad\left( {{t_{1}\quad\left( {1 - \overset{\sim}{t}} \right)} + {t_{2}\quad\overset{\sim}{t}}} \right)} = {\sum\limits_{i = 0}^{n}\quad{\sum\limits_{k = 0}^{j}\quad{B_{k}^{n - i}\quad\left( t_{1} \right)\quad B_{j - k}^{i}\quad\left( t_{2} \right)\quad B_{i}^{n}\quad\left( \overset{\sim}{t} \right)}}}} & {{EQ}.\quad 96} \end{matrix}$ the transformation rule for the coefficients are: $\begin{matrix} {{\overset{\sim}{q}}_{j} = {\sum\limits_{i = 0}^{n}\quad{\sum\limits_{k = 0}^{j}\quad{B_{k}^{n - j}\quad\left( t_{1} \right)\quad B_{i - k}^{j}\quad\left( t_{2} \right)\quad{q_{i}.}}}}} & {{EQ}.\quad 97} \end{matrix}$

Equation 97 can be rewritten in terms of matrices as: {tilde over (Q)}=K ^((n))(t ₁ ,t ₂)Q  EQ. 98 with the matrix element given as: $\begin{matrix} {{K_{ij}^{n} \equiv \left( {K^{(n)}\quad\left( {t_{1},t_{2}} \right)} \right)_{ij}} = {\sum\limits_{k = 0}^{j}\quad{B_{k}^{n - i}\quad\left( t_{1} \right)\quad B_{j - k}^{i}\quad{\left( t_{2} \right).}}}} & {{EQ}.\quad 99} \end{matrix}$

Using this generalized description, Equation 62 can be seen as a specific case where: $\begin{matrix} {{D_{ij}\quad(c)} = {K_{ij}^{n}\quad\left( {0,c} \right)}} & {{EQ}.\quad 100} \end{matrix}$ and Equation 79 can be viewed as a specific case where: $\begin{matrix} {S_{ij}^{n} = {K_{ij}^{n}\quad{\left( {1,2} \right).}}} & {{EQ}.\quad 101} \end{matrix}$

API for Transforming and Rendering Paths

Some embodiments of the present invention provide Application Programming Interfaces (API) that transform a path using the perspective or bilinear transform discussed above and then render the transformed path using the rendering technique described above. Under one such embodiment, an API for transforming and drawing a path is invoked using the API call DrawWarpPath(p, pen, dstPoints, dstCount, srcRect, srcUnit, quadMode) where p is the path to be transformed, pen is a pen type to be used when drawing the path, dstPoints is a list of edges for a quadrilateral that defines the transform, dstCount is three when the defining quadrilateral is a parallelogram and four otherwise, srcRect are points that describe a source rectangle in terms of a unit measure found in srcUnit, and quadMode is either bilinear or perspective. In other embodiments, an API for transforming and filling a path is invoked using the API call FillWarpPath(p, b, dstPoints, dstCount, srcRect, srcUnit, quadMode) where the parameters that are found in both DrawWarpPath and FillWarpPath have the same properties and the parameter b in FillWarpPath is a brush style that describes the texture, and color to be used to fill the path. In some embodiments, that path parameter passed to the API is a list of paths to be rendered on the screen.

FIG. 9 shows a block diagram of software and hardware components that are utilized with the API's described above. In FIG. 9, an application 600 calls a transform API 602, such as DrawWarpPath and FillWarpPath above. In the embodiment of FIG. 9, the transform API is packaged as part of a graphics device interface 604 (GDI.DLL) within an operating system 606 such as Windows 95®, Windows 98®, Windows® 2000, or Windows NT® from Microsoft Corporation of Redmond, Wash. Transform API 602 transforms the path provided by the application and renders the transformed path into a back buffer 608 of a display memory 610. Back buffer 608 is periodically swapped with a forward buffer 612, which is accessed by a display driver 614 to provided display values to a display 616 thereby displaying the transformed path.

FIG. 10 and the related discussion are intended to provide a brief, general description of a suitable computing environment in which the invention may be implemented. Although not required, the invention will be described, at least in part, in the general context of computer-executable instructions, such as program modules, being executed by a personal computer. Generally, program modules include routine programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, and the like. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.

With reference to FIG. 10, an exemplary system for implementing the invention includes a general purpose computing device in the form of a conventional personal computer 20, including a processing unit (CPU) 21, a system memory 22, and a system bus 23 that couples various system components including the system memory 22 to the processing unit 21. The system bus 23 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The system memory 22 includes read only memory (ROM) 24 and random access memory (RAM) 25. A basic input/output (BIOS) 26, containing the basic routine that helps to transfer information between elements within the personal computer 20, such as during start-up, is stored in ROM 24. The personal computer 20 further includes a hard disk drive 27 for reading from and writing to a hard disk (not shown), a magnetic disk drive 28 for reading from or writing to removable magnetic disk 29, and an optical disk drive 30 for reading from or writing to a removable optical disk 31 such as a CD ROM or other optical media. The hard disk drive 27, magnetic disk drive 28, and optical disk drive 30 are connected to the system bus 23 by a hard disk drive interface 32, magnetic disk drive interface 33, and an optical drive interface 34, respectively. The drives and the associated computer-readable media provide nonvolatile storage of computer readable instructions, data structures, program modules and other data for the personal computer 20.

Although the exemplary environment described herein employs the hard disk, the removable magnetic disk 29 and the removable optical disk 31, it should be appreciated by those skilled in the art that other types of computer readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, random access memories (RAMs), read only memory (ROM), and the like, may also be used in the exemplary operating environment.

A number of program modules may be stored on the hard disk, magnetic disk 29, optical disk 31, ROM 24 or RAM 25, including an operating system 35, one or more application programs 36, other program modules 37, and program data 38. A user may enter commands and information into the personal computer 20 through local input devices such as a keyboard 40, pointing device 42 and a microphone 43. Other input devices (not shown) may include a joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 21 through a serial port interface 46 that is coupled to the system bus 23, but may be connected by other interfaces, such as a sound card, a parallel port, a game port or a universal serial bus (USB). A monitor 47 or other type of display device is also connected to the system bus 23 via an interface, such as a video adapter 48. In addition to the monitor 47, personal computers may typically include other peripheral output devices, such as a speaker 45 and printers (not shown).

The personal computer 20 may operate in a networked environment using logic connections to one or more remote computers, such as a remote computer 49. The remote computer 49 may be another personal computer, a hand-held device, a server, a router, a network PC, a peer device or other network node, and typically includes many or all of the elements described above relative to the personal computer 20, although only a memory storage device 50 has been illustrated in FIG. 10. The logic connections depicted in FIG. 10 include a local area network (LAN) 51 and a wide area network (WAN) 52. Such networking environments are commonplace in offices, enterprise-wide computer network Intranets, and the Internet.

When used in a LAN networking environment, the personal computer 20 is connected to the local area network 51 through a network interface or adapter 53. When used in a WAN networking environment, the personal computer 20 typically includes a modem 54 or other means for establishing communications over the wide area network 52, such as the Internet. The modem 54, which may be internal or external, is connected to the system bus 23 via the serial port interface 46. In a network environment, program modules depicted relative to the personal computer 20, or portions thereof, may be stored in the remote memory storage devices. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used. For example, a wireless communication link may be established between one or more portions of the network.

Although the present invention has been described with reference to particular embodiments, workers skilled in the art will recognize that changes may be made in form and detail without departing from the spirit and scope of the invention. 

1. A method of displaying an image on a computer screen, the method comprising: describing at least a portion of a base image as a path, the path representing multiple pixels; performing a non-affine transform on the path instead of the multiple pixels represented by the path to produce a transformed path of the form $\sum\limits_{i = 0}^{n}\quad{{B_{i}^{n}(t)}q_{i}}$  where t is between zero and one; and rendering the transformed path onto the computer screen by approximating the transformed path as a series of lines, wherein approximating the transformed path as a series of lines comprises: converting the transformed path from a function that describes an entire curve to a function of the form $\sum\limits_{j = 0}^{n}\quad{{B_{j}^{n}(t)}{\overset{\sim}{q}}_{j}}$  that describes a segment of the curve by setting each ${\overset{\sim}{q}}_{j} = {\sum\limits_{i = 0}^{j}\quad{{B_{i}^{j}(d)}q_{i}}}$  where c is a fixed fraction; and determining if the segment of the curve can be replaced by a straight line based on the function that describes the segment.
 2. The method of claim 1 wherein approximating the transformed path as a series of lines further comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{{B_{i}^{n}(t)}q_{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{{B_{j}^{n}(t)}{\overset{\sim}{q}}_{j}}$  that describes a larger segment of the curve by setting each ${\overset{\sim}{q}}_{j} = {\sum\limits_{i = 0}^{j}\quad{{B_{i}^{j}(d)}q_{i}}}$  where d is a fixed value that is greater than one; and determining if the larger segment of the curve can be replaced by a straight line based on the function that describes the segment.
 3. The method of claim 1 wherein approximating the transformed path as a series of lines further comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{{B_{i}^{n}(t)}q_{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{{B_{j}^{n}(t)}{\overset{\sim}{q}}_{j}}$  that describes a neighboring segment of the curve by setting each ${{\overset{\sim}{q}}_{j} = {\sum\limits_{i = {n - j}}^{n}\quad{\left( {- 1} \right)^{n - i}\begin{pmatrix} j \\ {n - i} \end{pmatrix}2^{j - {({n - i})}}q_{i}}}};$ and determining if the neighboring segment of the curve can be replaced by a straight line based on the function that describes the segment.
 4. A method of displaying an image on a computer screen, the method comprising: describing at least a portion of a base image as a path, the path representing multiple pixels; performing a non-affine transform on the path instead of the multiple pixels represented by the path to produce a transformed path of the form $r = {\sum\limits_{i = 0}^{n}\quad{a_{i}\quad t^{i}}}$  where t is between zero and one; and rendering the transformed path onto the computer screen by approximating the transformed path as a series of lines and rendering each line in the series of lines, wherein approximating the transformed path as a series of lines comprises: converting the transformed path from a function that describes an entire curve to a function of the form $\sum\limits_{j = 0}^{n}\quad{{\overset{\sim}{a}}_{j}\quad t^{j}}$  that describes a segment of the curve by setting each ã_(j)=c^(j)a_(j) where c is a fixed fraction; and determining if the segment of the curve can be replaced by a straight line based on the function that describes the segment.
 5. The method of claim 4 wherein approximating the transformed path as a series of lines further comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}t^{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{{\overset{\sim}{a}}_{j}t^{j}}$  that describes a larger segment of the curve by setting each ã_(j)=d^(j)a_(j) where d is a fixed value that is greater than one; and determining if the larger segment of the curve can be replaced by a straight line based on the function that describes the segment.
 6. The method of claim 4 wherein approximating the transformed path as a series of lines further comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}t^{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{{\overset{\sim}{a}}_{j}t^{j}}$  that describes a neighboring segment of the curve by setting each ${{\overset{\sim}{a}}_{j} = {\sum\limits_{i = j}^{n}\quad{\frac{i!}{{j!}{\left( {i - j} \right)!}}a_{i}}}};$ and determining if the neighboring segment of the curve can be replaced by a straight line based on the function that describes the segment.
 7. A method of displaying an image on a computer screen, the method comprising: describing at least a portion of a base image as a path, the path representing multiple pixels; performing a non-affine transform on the path instead of the multiple pixels represented by the path to produce a transformed path; and rendering the transformed path onto the computer screen; wherein performing a non-affine transform and rendering the transformed path comprise: issuing a call to a server process while passing parameters comprising the path of the base image and a type of non-affine transform; and processing the call in the server process by performing the transform and rendering the transformed path.
 8. The method of claim 7 wherein issuing a call to a server process further comprises passing parameters further comprising corner points for a quadrilateral that defines a transform space.
 9. The method of claim 8 wherein issuing a call to a server process further comprises passing parameters further comprising a pen style to be used during rendering.
 10. The method of claim 8 wherein passing a path comprises passing a list of paths.
 11. The method of claim 10 wherein issuing a call to a server process further comprises passing parameters further comprising a brush style for filling a space between at least two rendered transformed paths.
 12. A method for rendering a curve on a computer screen comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{\frac{n!}{{i!}\quad{\left( {n - i} \right)!}}\quad t^{i}\quad\left( {1 - t} \right)^{n - i}\quad q_{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{\frac{n!}{{j!}\quad{\left( {n - j} \right)!}}\quad t^{j}\quad\left( {1 - t} \right)^{n - j}\quad{\overset{\sim}{q}}_{j}}$  that describes a different sized segment of the curve by setting each ${\overset{\sim}{q}}_{j} = {\sum\limits_{i = 0}^{j}\quad{\frac{j!}{{i!}\quad{\left( {j - i} \right)!}}\quad c^{i}\quad\left( {1 - c} \right)^{j - j}\quad{\overset{\sim}{q}}_{i}}}$  where c is a fixed value that determines the segment size; determining if the different sized segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 13. A method for rendering a curve on a computer screen comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{\frac{n!}{{i!}\quad{\left( {n - i} \right)!}}\quad t^{i}\quad\left( {1 - t} \right)^{n - i}\quad q_{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{\frac{n!}{{j!}\quad{\left( {n - j} \right)!}}\quad t^{j}\quad\left( {1 - t} \right)^{n - j}\quad{\overset{\sim}{q}}_{j}}$  that describes an adjacent segment of the curve by setting each ${{\overset{\sim}{q}}_{j} = {\sum\limits_{i = {n - j}}^{n}\quad{\left( {- 1} \right)^{n - i}\quad\begin{pmatrix} j \\ {n - i} \end{pmatrix}\quad 2^{j - {({n - i})}}\quad q_{i}}}};$ determining if the adjacent segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 14. A method for rendering a curve on a computer screen comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}\quad t^{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{i = 0}^{n}\quad{{\overset{\sim}{a}}_{j}\quad t^{j}}$  that describes a different sized segment of the curve by setting each ã_(j)=c^(j)a_(j) where c is a fixed value that determines the segment size; determining if the different sized segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 15. A method for rendering a curve on a computer screen comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}\quad t^{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{i = 0}^{n}\quad{{\overset{\sim}{a}}_{j}\quad t^{j}}$  that describes an adjacent segment of the curve by setting each ${{\overset{\sim}{a}}_{j} = {\sum\limits_{i = j}^{n}\quad{\frac{i!}{{j!}\quad{\left( {i - j} \right)!}}\quad a_{i}}}};$ determining if the adjacent segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 16. A computer-readable medium having computer-executable components for performing steps comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{\frac{n!}{{i!}{\left( {n - i} \right)!}}{t^{i}\left( {1 - t} \right)}^{n - i}q_{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{\frac{n!}{{j!}{\left( {n - j} \right)!}}{t^{j}\left( {1 - t} \right)}^{n - j}{\overset{\sim}{q}}_{j}}$  that describes a different sized segment of the curve by setting each ${\overset{\sim}{q}}_{j} = {\sum\limits_{i = 0}^{j}\quad{\frac{j!}{{i!}{\left( {j - i} \right)!}}{c^{i}\left( {1 - c} \right)}^{j - i}q_{i}}}$  where c is a fixed value that determines the segment size; determining if the different sized segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 17. A computer-readable medium having computer-executable components for performing steps comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{\frac{n!}{{i!}{\left( {n - i} \right)!}}{t^{i}\left( {1 - t} \right)}^{n - i}{\overset{\sim}{q}}_{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{\frac{n!}{{j!}{\left( {n - j} \right)!}}{t^{j}\left( {1 - t} \right)}^{n - j}{\overset{\sim}{q}}_{j}}$  that describes an adjacent segment of the curve by setting each ${{\overset{\sim}{q}}_{j} = {\sum\limits_{i = {n - j}}^{n}\quad{\left( {- 1} \right)^{n - i}\begin{pmatrix} j \\ {n - i} \end{pmatrix}2^{j - {({n - i})}}q_{i}}}};$ determining if the adjacent segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 18. A computer-readable medium having computer-executable components for performing steps comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}t^{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{{\overset{\sim}{a}}_{j}\quad t^{j}}$  that describes a different sized segment of the curve by setting each ã_(j)=c^(j)a_(j) where c is a fixed value that determines the segment size; determining if the different sized segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 19. A computer-readable medium having computer-executable components for performing steps comprising: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}t^{i}}$  that describes a segment of the curve into a function of the form $\sum\limits_{j = 0}^{n}\quad{{\overset{\sim}{a}}_{j}\quad t^{j}}$  that describes an adjacent segment of the curve by setting each ${{\overset{\sim}{a}}_{j} = {\sum\limits_{i = j}^{n}\quad{\frac{i!}{{j!}{\left( {i - j} \right)!}}\quad a_{i}}}};$ determining if the adjacent segment of the curve can be replaced by a straight line based on the function that describes the segment; and rendering the straight line onto the computer screen if the straight line replaced the segment.
 20. A computer-readable medium having computer-executable components for performing steps comprising: generating a function to describe multiple pixels of an image for a computer screen; transforming the function instead of the multiple pixels using a non-affine transform to produce a transformed function; and converting the transformed function into a series of lines and converting each line into an image, wherein converting the transformed function into a series of lines comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{\frac{n!}{{j!}\quad{\left( {n - i} \right)!}}\quad t^{i}\quad\left( {1 - t} \right)^{n - i}\quad q_{i}}$  that describes a segment of a curve represented by the transform function into a function of the form $\sum\limits_{j = 0}^{n}\quad{\frac{n!}{{i!}\quad{\left( {n - j} \right)!}}\quad t^{j}\quad\left( {1 - t} \right)^{n - j}\quad{\overset{\sim}{q}}_{j}}$  that describes a different sized segment of the curve by setting each ${\overset{\sim}{q}}_{j} = {\sum\limits_{i = 0}^{j}\quad{\frac{j!}{{i!}\quad{\left( {j - i} \right)!}}\quad c^{i}\quad\left( {1 - c} \right)^{j - i}\quad q_{i}}}$  where c is a fixed value; and determining if the different sized segment of the curve can be replaced by a straight line based on the function that describes the segment.
 21. A computer-readable medium having computer-executable components for performing steps comprising: generating a function to describe multiple pixels of an image for a computer screen; transforming the function instead of the multiple pixels using a non-affine transform to produce a transformed function; and converting the transformed function into a series of lines and converting each line into an image, wherein converting the transformed function into a series of lines comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{\frac{n!}{{i!}\quad{\left( {n - i} \right)!}}\quad t^{i}\quad\left( {1 - t} \right)^{n - i}\quad q_{i}}$  that describes a segment of a curve represented by the transform function into a function of the form $\sum\limits_{j = 0}^{n}\quad{\frac{n!}{{j!}\quad{\left( {n - j} \right)!}}\quad t^{j}\quad\left( {1 - t} \right)^{n - j}\quad{\overset{\sim}{q}}_{j}}$  that describes an adjoining segment of the curve by setting each ${{\overset{\sim}{q}}_{j} = {\sum\limits_{i = {n - j}}^{n}\quad{\left( {- 1} \right)^{n - i}\quad\begin{pmatrix} j \\ {n - i} \end{pmatrix}\quad 2^{j - {({n - i})}}\quad q_{i}}}};$  and determining if the adjoining segment of the curve can be replaced by a straight line based on the function that describes the segment.
 22. A computer-readable medium having computer-executable components for performing steps comprising: generating a function to describe multiple pixels of an image for a computer screen; transforming the function instead of the multiple pixels using a non-affine transform to produce a transformed function; and converting the transformed function into a series of lines and converting each line into an image, wherein converting the transformed function into a series of lines comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}\quad t^{i}}$  that describes a segment of a curve represented by the transform function into a function of the form $\sum\limits_{j = 0}^{n}\quad{{\overset{\sim}{a}}_{j}\quad t^{j}}$  that describes a different sized segment of the curve by setting each ã_(j)=c^(j)a_(j) where c is a fixed value; and determining if the different sized segment of the curve can be replaced by a straight line based on the function that describes the segment.
 23. A computer-readable medium having computer-executable components for performing steps comprising: generating a function to describe multiple pixels of an image for a computer screen; transforming the function instead of the multiple pixels using a non-affine transform to produce a transformed function; and converting the transformed function into a series of lines and converting each line into an image, wherein converting the transformed function into a series of lines comprises: converting a function of the form $\sum\limits_{i = 0}^{n}\quad{a_{i}\quad t^{i}}$  that describes a segment of a curve represented by the transform function into a function of the form $\sum\limits_{j = 0}^{n}\quad{{\overset{\sim}{a}}_{j}\quad t^{j}}$  that describes an adjoining segment of the curve by setting each ${{\overset{\sim}{a}}_{j} = {\sum\limits_{i = j}^{n}\quad{\frac{i!}{{j!}\quad{\left( {i - j} \right)!}}\quad a_{i}}}};$  and determining if the adjoining segment of the curve can be replaced by a straight line based on the function that describes the segment. 